home *** CD-ROM | disk | FTP | other *** search
- Path: news.mcs.net!mdp
- From: mdp@mika-sys.com (Michael D. Perry)
- Newsgroups: comp.lang.c
- Subject: Printing to LPT1 Printer from within program
- Date: Wed, 24 Jan 96 14:07:05 GMT
- Organization: MIKA Systems
- Message-ID: <4e5ee9$m28_001@pr.mcs.net>
- NNTP-Posting-Host: mdp.pr.mcs.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- I have just started taking a C programming class and am using Borland
- C++ v4.0 at home. Both my teacher and I are stumped as to how to
- print to a LPT (Line Printer) device from within the program.
-
- I have read the FAQ and there are some references to this but not
- enough that I can quite figure it out. As near as I can figure you
- can use iostreams or fprintf() with the later appearing to be the
- simpler of the two. With that, from what I have seen, one uses a
- filename of stdprn but I get an error message when compiling. My
- guess is that there is a header file or a definition/declaration
- statement that needs to be referenced.
-
- In Pascal the Function LPrint() does this job quite nicely but I can
- find no suitable similar function in my reference manuals. Can anyone
- help with the appropriate function(s) and perhaps some examples of
- them in source code?
-
- I have looked at lots of materials on the Internet, quite a few books,
- and hours in the on-line help and manuals for Borland C++ without
- finding anything much about this. So either I am incredibly stupid
- because the answer is so obvious that no one writes about it or it is
- a little more obscure and someone maybe should write it into an FAQ?
-
- Thanks in advance;
-
- Mike
-
- -------------------------------------------------------------------
- Michael D. Perry | FIRST RULE OF INTELLIGENT TINKERING:
- MIKA Systems | Save all the parts.
- Glen Ellyn, Illinois | SATTINGER'S LAW:
- mdp@mika-sys.com | It works better if you plug it in.
- -------------------------------------------------------------------
-